package com.gmail.rusal4ica.dots;


import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.widget.ImageView;

/**
 * @author The Imperial Sword Team
 */

public class OptionsActivity extends FragmentActivity {
	static int game; //1 for human, 2 for gsm
	static int sizeN; //3 for 3x4, 4 for 4x4, 5 for 5x4
	static final int SIZE_M = 9;
	
	private ImageView buttonHuman;
	private ImageView buttonGsm;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.options);

		buttonHuman = (ImageView)findViewById(R.id.human);
		buttonGsm = (ImageView)findViewById(R.id.gsm);

		buttonHuman.setOnClickListener(onClickSetGame);
		buttonGsm.setOnClickListener(onClickSetGame);
	}
	
	View.OnClickListener onClickSetGame = new View.OnClickListener() {
		@Override
		public void onClick(View v) {
			switch(v.getId()){
			case(R.id.human):
				game = 1;
				chooseBoardSize();
			break;
			case(R.id.gsm):
				game = 2;
				chooseBoardSize();
			break;
			}
		}
	};	
	
	private void chooseBoardSize() {   
		DialogFragment newFragment = new ChooseBoardSizeDialog();
		newFragment.show(getSupportFragmentManager(), "board size");
	}
}
